#include <p24FJ32GA002.h>
#include <stdio.h>

InitTMR2(){
  	T2CONbits.TCKPS 	= 0xFF;		// GEEN PRESCALER
  	T2CONbits.TCS		= 0;		// SYSTEM CLOCK SOURCE
  	IEC0bits.T2IE		= 0;		// INTERRUPT ENABLE VOOR TMR4
  	IFS0bits.T2IF 		= 0;		// CLEAR INTERRUPT
	TMR2				= 0;
  	PR2				= 0x3FFF;	
	}
EnTMR2(){
//  T2CONbits.TON	= 0; // start timer
  IEC1bits.CNIE = 1;		// enable the interrupt on change notification

}

DisTMR2(){
//  T2CONbits.TON	= 0; // start timer
  IEC1bits.CNIE = 0;		// enable the interrupt on change notification
	IFS1bits.CNIF = 0; 		// clear the interrupt flag
}

